In addition to the default styles, Silverlight Elements includes a number of styles that you can use to give your applications an attractive Office- or Blend-style theme.

There are five custom styles available. To use a custom style, merge the style’s resource dictionary into your resources, and reference the relevant style name when defining your controls.

To merge a style’s resource dictionary into your resources, use the ResourceDictionary.MergedDictionaries property. The Source for the merged dictionary should be /Mindscape/SilverlightElements;component/Themes/style.xaml where style.xaml is one of the following XAML file names:

For example:

CopyXML
<UserControl.Resources>
  <ResourceDictionary>
    <ResourceDictionary.MergedDictionaries>
      <ResourceDictionary Source="/Mindscape.SilverlightElements;component/Themes/OfficeBlue.xaml" />
    </ResourceDictionary.MergedDictionaries>
    <!-- Your own resources here -->
  </ResourceDictionary>
</UserControl.Resources>

To apply the style to a control, set the control’s Style property. Note that this much be done on each control. For example:

CopyXML
<ms:Scheduler Style="{StaticResource SchedulerStyle}" />

The resource keys for the various controls are as follows:

Control Style Key
ColorPicker ColorPickerStyle
DualProgressBar DualProgressBarStyle
DualSlider DualSliderStyle
Expander ExpanderStyle
Menu MenuStyle
ListView ListViewStyle
MulticolumnTreeView MulticolumnTreeViewStyle
NumericUpDown NumericUpDownStyle
OutlookBar OutlookBarStyle
PaletteColorPicker PaletteColorPickerStyle
Scheduler SchedulerStyle
Slider SliderStyle
SplitButton SplitButtonStyle
StandardRichTextEditorToolBar HtmlEditorToolBarStyle
TimePicker TimePickerStyle
TimeSpanPicker TimeSpanPickerStyle